#pragma once
#define ROOT_KEY HKEY_CURRENT_USER
#define DATA_SETTING _T("Software\\Notify\\Settings")
#define DATA_PATH_DAY _T("Software\\Notify\\Day\\")
#define DATA_PATH_WEEK _T("Software\\Notify\\Week")
#define DATA_PATH_MONTH _T("Software\\Notify\\Month")
class RegHandler
{
public:
	RegHandler(void);
	~RegHandler(void);
public:
	// we will store the data in a fix path
	// the return value,0 is success, -1 is not find
	int OpenReg();
	// struct today, week, month, year
	int GetAllRecord(int nType);	// get values which match the key 
	int AddRecord(int nType, LPCTSTR strKey, LPCTSTR strValue);
	int DelRecord(int nType, LPCTSTR strKey, LPCTSTR strValue);
	int CloseReg();
//private:
	int ReadData(LPCTSTR strName, CString *strValue);
	int ReadData(LPCTSTR strName, LPCTSTR strKey, CString *strValue);
	int ReadData(LPCTSTR strName, LPCTSTR strKey, DWORD *strValue);
private:
	HKEY m_hKey;
};

